package com.uvnos4j.matilda.system.vo;

import com.uvnos4j.matilda.commons.vo.AbstractVo;
import com.uvnos4j.matilda.system.domain.SysDept;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * DeptVo View Object 接收视图层数据的值对象
 *
 * @author Guo.wl
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DeptVo extends AbstractVo<SysDept> {

    @NotBlank(message = "部门名称不能为空")
    @Length(min = 2, max = 15, message = "部门名称长度在2到15之间")
    private String name;

    private String parentId = "0";

    @NotNull(message = "顺序不能为空")
    private Integer seq;

    @Length(max = 150, message = "备注的长度需要在150以内")
    private String note;

}